<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title><% model(2); %></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="style.css" />
<script type="text/javascript" src="jquery.min.js"></script>
<script type="text/javascript" src="jquery.selectboxes.js"></script>
<script type="text/javascript" src="config.js"></script>
<script type="text/javascript" src="general.js"></script>
<script type="text/javascript">
	$(document).ready(function() {
		if (!(rt_config & CONFIG_LLTD))
			elemByName('lltd_enable').closest('tr').remove();
		if (!hasUSB() || !(rt_config & (CONFIG_LPRNG | CONFIG_P910ND)))
			elemByName('lpr_enable').closest('.sect').remove();
		else if (!(rt_config & CONFIG_LPRNG))
			elemByName('lpr_enable').closest('tr').remove();
		else if (!(rt_config & CONFIG_P910ND))
			elemByName('raw_enable').closest('tr').remove();
		if (!hasUSB())
			elemByName('usb20_disable_x').closest('.sect').remove();
		if (!hasUSB() || !(rt_config & (CONFIG_NTFS | CONFIG_NTFS3G)))
			elemByName('usb_ntfs3g_enable').closest('.sect').remove();
		else if (!(rt_config & CONFIG_NTFS))
			elemByName('usb_ntfs3g_enable').removeOption('0');
		else if (!(rt_config & CONFIG_NTFS3G))
			elemByName('usb_ntfs3g_enable').removeOption('1');
		load_body();
	});
</script>
</head>
<body>
<form method="get" name="form" id="form" action="apply.cgi">
<input type="hidden" name="current_page" value="services.asp" />
<input type="hidden" name="next_page" value="services.asp" />
<input type="hidden" name="next_host" value="" />
<input type="hidden" name="modified" value="0" />
<input type="hidden" name="action_mode" value="" />
<input type="hidden" name="first_time" value="" />
<input type="hidden" name="action_script" value="" />

<table class="main">
<thead>
<tr>
<td>System Setup - Services Configuration</td>
</tr>
</thead>

<tr><td>
<table class="sect">
<tr>
<td class="desc" colspan="2">The router runs several services by default, this page allows
you to perform advanced configuration.</td>
</tr>
</table>
</td></tr>

<tr><td>

<table class="sect">
<thead>
<tr>
<td colspan="2">Network services</td>
</tr>
</thead>
<tr>
<th title="Enables Telnet daemon.">Enable telnet access:</th>
<td><input type="radio" value="1" name="telnet_enable" class="content_input_fd" onClick="return change_common_radio(this, 'PrinterStatus', 'telnet_enable', '1')" <% nvram_match("telnet_enable", "1", "checked"); %> />Yes<input type="radio" value="0" name="telnet_enable" class="content_input_fd" onClick="return change_common_radio(this, 'PrinterStatus', 'telnet_enable', '0')" <% nvram_match("telnet_enable", "0", "checked"); %> />No</td>
</tr>
<tr>
<th title="Enables SSH daemon.">Enable SSH access:</th>
<td><select name="ssh_enable" class="content_input_fd">
<option class="content_input_fd" value="0" <% nvram_match("ssh_enable","0","selected"); %>>No</option>
<option class="content_input_fd" value="1" <% nvram_match("ssh_enable","1","selected"); %>>Yes, WAN &amp; LAN</option>
<option class="content_input_fd" value="2" <% nvram_match("ssh_enable","2","selected"); %>>Yes, LAN Only</option>
</select></td>
</tr>
<tr>
<th title="This field indicates the port number used by SSH protocol.">SSH Port:</th>
<td><input type="text" maxlength="5" size="5" name="ssh_port" class="content_input_fd" value="<% nvram_get("ssh_port"); %>" onBlur="validate_range(this, 1, 65535)" onKeyPress="return is_number(event, this)" /></td>
</tr>
<tr>
<th
    title="This is disallow password login. You must use public key to login.">Disable SSH password login:</th>
<td>
    <input type="radio" name="ssh_password_logins" value="0"
        class="content_input_fd"
        onClick="return change_common_radio(this, 'PrinterStatus', 'ssh_password_logins', '1')"
        <% nvram_match("ssh_password_logins", "0", "checked"); %> />Yes
    <input type="radio" name="ssh_password_logins" value="1"
        class="content_input_fd"
        onClick="return change_common_radio(this, 'PrinterStatus', 'ssh_password_logins', '0')"
        <% nvram_match("ssh_password_logins", "1", "checked"); %> />No
    </td>
</tr>

<tr>
<th
    title="Input one key per row. Press 'Clear' button to delete the keys.">Change SSH public keys:</th>
<td>
	<input type="radio" name="ssh_keys_change" value="1"
		class="content_input_fd"
		onclick="this.form.ssh_keys.disabled=this.form.ssh_keys_clear.disabled=false;true;" />Yes
	<input type="radio" name="ssh_keys_change" value="0" checked
		class="content_input_fd"
		onclick="this.form.ssh_keys.disabled=this.form.ssh_keys_clear.disabled=true;" />No
	</td>
</tr>

<tr>
<td colspan="2">
	<!--<span class="content_header_td">Input one key per row:</span>-->
	<input type="hidden" name="ssh_keys_changed" value="0" />
	<table><tr>
		<td style="border:0;">
			<textarea name="ssh_keys" cols="70" rows="8" disabled 
				onchange="this.form.ssh_keys_changed.value=1;"
				><% nvram_dump("ssh_keys.log", ""); %></textarea></td>
		<td valign="top" style="border:0;">
			<input type="button" name="ssh_keys_clear" value="Clear" disabled
				onclick="this.form.ssh_keys.value='';this.form.ssh_keys_changed.value=1;"
				/></td>
	</tr></table>
</td>
</tr>

<tr><th title="Enables Link Layer Topology Discovery daemon.">Enable LLTD responder:</th><td><input type="radio" value="1" name="lltd_enable" class="content_input_fd" onClick="return change_common_radio(this, 'PrinterStatus', 'lltd_enable', '1')" <% nvram_match("lltd_enable", "1", "checked"); %> />Yes<input type="radio" value="0" name="lltd_enable" class="content_input_fd" onClick="return change_common_radio(this, 'PrinterStatus', 'lltd_enable', '0')" <% nvram_match("lltd_enable", "0", "checked"); %> />No</td></tr>
</table>
</td></tr>

<tr><td>
<table class="sect">
<thead>
<tr>
<td colspan="2">Printing services</td>
</tr>
</thead>

<tr>
<th title="Enables LPR protocol support.">Enable LPR printing:</th>
<td><input type="radio" value="1" name="lpr_enable" class="content_input_fd" onClick="return change_common_radio(this, 'PrinterStatus', 'lpr_enable', '1')" <% nvram_match("lpr_enable", "1", "checked"); %> />Yes<input type="radio" value="0" name="lpr_enable" class="content_input_fd" onClick="return change_common_radio(this, 'PrinterStatus', 'lpr_enable', '0')" <% nvram_match("lpr_enable", "0", "checked"); %> />No</td>
</tr>
<tr>
<th title="Enables RAW (Socket) protocol support.">Enable RAW printing:</th>
<td><input type="radio" value="1" name="raw_enable" class="content_input_fd" onClick="return change_common_radio(this, 'PrinterStatus', 'raw_enable', '1')" <% nvram_match("raw_enable", "1", "checked"); %> />Yes<input type="radio" value="0" name="raw_enable" class="content_input_fd" onClick="return change_common_radio(this, 'PrinterStatus', 'raw_enable', '0')" <% nvram_match("raw_enable", "0", "checked"); %> />No</td>
</tr>
</table>
</td></tr>

<tr><td>
<table class="sect">
<thead>
<tr>
<td colspan="2">USB features</td>
</tr>
</thead>

<tr>
<th title="USB controller mode.">USB controller mode:</th>
<td><select name="usb20_disable_x" class="content_input_fd">
<option class="content_input_fd" value="0" <% nvram_match("usb20_disable_x","0","selected"); %>>USB 1.1 &amp; USB 2.0</option>
<option class="content_input_fd" value="1" <% nvram_match("usb20_disable_x","1","selected"); %>>USB 1.1 Only</option>
<option class="content_input_fd" value="2" <% nvram_match("usb20_disable_x","2","selected"); %>>USB 2.0 Only</option>
</select></td>
</tr>
<tr>
<th title="Enables USB Storage.">Enable USB Storage:</th>
<td><input type="radio" value="1" name="usb_storage_x" class="content_input_fd" onClick="return change_common_radio(this, 'PrinterStatus', 'usb_storage_x', '1')" <% nvram_match("usb_storage_x", "1", "checked"); %> />Yes<input type="radio" value="0" name="usb_storage_x" class="content_input_fd" onClick="return change_common_radio(this, 'PrinterStatus', 'usb_storage_x', '0')" <% nvram_match("usb_storage_x", "0", "checked"); %> />No</td>
</tr>
</table>
</td></tr>

<tr><td>
<table class="sect">
<thead>
<tr>
<td colspan="2">Filesystem options</td>
</tr>
</thead>

<tr>
<th title="Enables NTFS Read-Write support (ntfs-3g). Disabling will increase the amount of the free RAM.">NTFS Support:</th>
<td>
<select name="usb_ntfs3g_enable" class="content_input_fd">
<option class="content_input_fd" value="0" <% nvram_match("usb_ntfs3g_enable","0","selected"); %>>Read only</option>
<option class="content_input_fd" value="1" <% nvram_match("usb_ntfs3g_enable","1","selected"); %>>Read-Write</option>
<option class="content_input_fd" value="2" <% nvram_match("usb_ntfs3g_enable","2","selected"); %>>Off</option>
</select></td></tr>
</table>
</td></tr>

<tr><td>
<table class="sect">
<thead>
<tr>
<td colspan="2">Miscellaneous</td>
</tr>
</thead>

<tr>
<th title="WPS button action.">WPS button action:</th>
<td class="content_input_td"><select name="btn_setup" class="content_input_fd">
<option class="content_input_fd" value="0" <% nvram_match("btn_setup","0","selected"); %>>Script at /usr/local/sbin/ez-setup</option>
<option class="content_input_fd" value="1" <% nvram_match("btn_setup","1","selected"); %>>Shutdown</option>
<option class="content_input_fd" value="2" <% nvram_match("btn_setup","2","selected"); %>>Reboot</option>
<option class="content_input_fd" value="3" <% nvram_match("btn_setup","3","selected"); %>>Wi-Fi on/off</option>
<option class="content_input_fd" value="4" <% nvram_match("btn_setup","4","selected"); %>>WAN on/off</option>
<option class="content_input_fd" value="5" <% nvram_match("btn_setup","5","selected"); %>>WAN reconnect</option>
</select></td>
</tr>
</table>
</td></tr>

</table>

<% include("footer_buttons.inc"); %>

</form>
</body>
</html>
